API Documentation
Static Public Member Functions | List of all members
nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper Class Referencefinal

Wraps a nkGraphics::Quaternion and offers functions for use in scripting. More...

Static Public Member Functions

static void updateEnvironment (nkScripts::Environment *env)
 
static void * constructor (const nkScripts::DataStack &stack)
 
static void destructor (void *toDestroy)
 
static nkScripts::OutputValue getX (void *vector)
 
static nkScripts::OutputValue getY (void *vector)
 
static nkScripts::OutputValue getZ (void *vector)
 
static nkScripts::OutputValue getW (void *vector)
 
static void setX (const nkScripts::DataStack &stack)
 
static void setY (const nkScripts::DataStack &stack)
 
static void setZ (const nkScripts::DataStack &stack)
 
static void setW (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue applyToVec (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue setFromAxisAngle (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue setFromEuler (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue toString (const nkScripts::DataStack &stack)
 

Detailed Description

Wraps a nkGraphics::Quaternion and offers functions for use in scripting.

Member Function Documentation

◆ updateEnvironment()

static void nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::updateEnvironment ( nkScripts::Environment env)
static

Updates a given environment and set it up to use all functions wrapped by this wrapper.

Parameters
envThe environment to set up.

◆ constructor()

static void* nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::constructor ( const nkScripts::DataStack stack)
static

Wrapper function for the constructor of the user type.

local t = nkGraphics.Quaternion.new() ;
Parameters
stackThe parameter stack.
Returns
An output value with the user type and data allocated.

◆ destructor()

static void nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::destructor ( void *  toDestroy)
static

Wrapper function for the destructor of the user type.

Parameters
toDestroyThe data that has to be freed.

◆ getX()

static nkScripts::OutputValue nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::getX ( void *  vector)
static

Wrapper function for the nkGraphics::Quaternion::getX(), exposed as an attribute getter.

local d = q.x ;
Parameters
vectorThe data from which the attribute will be retrieved.
Returns
The attribute value, as a float.

◆ getY()

static nkScripts::OutputValue nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::getY ( void *  vector)
static

Wrapper function for the nkGraphics::Quaternion::getY(), exposed as an attribute getter.

local d = q.y ;
Parameters
vectorThe data from which the attribute will be retrieved.
Returns
The attribute value, as a float.

◆ getZ()

static nkScripts::OutputValue nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::getZ ( void *  vector)
static

Wrapper function for the nkGraphics::Quaternion::getZ(), exposed as an attribute getter.

local d = q.z ;
Parameters
vectorThe data from which the attribute will be retrieved.
Returns
The attribute value, as a float.

◆ getW()

static nkScripts::OutputValue nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::getW ( void *  vector)
static

Wrapper function for the nkGraphics::Quaternion::getW(), exposed as an attribute getter.

local d = q.w ;
Parameters
vectorThe data from which the attribute will be retrieved.
Returns
The attribute value, as a float.

◆ setX()

static void nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::setX ( const nkScripts::DataStack stack)
static

Wrapper function for nkGraphics::Quaternion::setX(), exposed as an attribute setter.

q.x = 0.2 ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setY()

static void nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::setY ( const nkScripts::DataStack stack)
static

Wrapper function for nkGraphics::Quaternion::setY(), exposed as an attribute setter.

q.y = 0.2 ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setZ()

static void nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::setZ ( const nkScripts::DataStack stack)
static

Wrapper function for nkGraphics::Quaternion::setZ(), exposed as an attribute setter.

q.z = 0.2 ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setW()

static void nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::setW ( const nkScripts::DataStack stack)
static

Wrapper function for nkGraphics::Quaternion::setW(), exposed as an attribute setter.

q.w = 0.2 ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ applyToVec()

static nkScripts::OutputValue nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::applyToVec ( const nkScripts::DataStack stack)
static

Wrapper function for nkGraphics::Vector::operator*=() with a quaternion.

q:applyToVec(v) ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setFromAxisAngle()

static nkScripts::OutputValue nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::setFromAxisAngle ( const nkScripts::DataStack stack)
static

Wrapper function for nkGraphics::Quaternion::setFromAxisAngle() with vectors.

q:setFromAxisAngle(axis, angle) ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setFromEuler()

static nkScripts::OutputValue nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::setFromEuler ( const nkScripts::DataStack stack)
static

Wrapper function for nkGraphics::Quaternion::setFromEuler() with vectors.

q:setFromEuler(angles) ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ toString()

static nkScripts::OutputValue nkAstraeus::lua::nkGraphicsWrap::QuaternionWrapper::toString ( const nkScripts::DataStack stack)
static

Overrides the default string conversion function.

print(q) ;
Parameters
stackThe parameter stack.
Returns
The output value, as a string.

The documentation for this class was generated from the following file: